{extend name='base' /}
{block name='main'}
<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        给角色分配节点
    </div>
    <ol class="am-breadcrumb">
        <li><a href="#" class="am-icon-home">首页</a></li>
        <li class="am-active">权限管理</li>
        <li class="am-active">分配节点</li>
    </ol>
    <div class="tpl-portlet-components">
        <form action="/Role" method="post">
            <div class="tpl-block">
                <div class="am-g">
                    <div class="am-u-sm-12 am-u-md-6">
                        <div class="am-btn-toolbar">
                            <div class="am-btn-group am-btn-group-xs">
                                <button type="submit" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-save"></span> 保存</button>
                                <a href="{:url('admin/Role/index')}" class="am-btn am-btn-default am-btn-success"><span class="am-icon-trash-o"></span> 返回</a>
                            </div>
                        </div>
                    </div>
                </div>
                <hr>
                <div class="am-g">
                    <div class="am-u-sm-12">
                        <input type="hidden" name="rid" value="{$id}">
                        <style>
                            .mm-ul li{
                                width: 200px;
                                float:left;
                            }
                        </style>
                        <ul class="mm-ul">
                            {volist name='data' id='node'}
                            {if in_array($node.id,$userrole)}
                                <li>
                                    <a style="color:#d83832;margin-right:10px; "><label>
                                        <input type="checkbox" name="node[]" checked  value="{$node.id}" >{$node.name}
                                    </label></a>
                                </li>
                            {else}
                                <li>
                                    <a style="color:#485a6a;margin-right:10px; "><label>
                                        <input type="checkbox" name="node[]"  value="{$node.id}" >{$node.name}
                                    </label></a>
                                </li>
                            {/if}
                            {/volist}
                        </ul>
                    </div>

                </div>
            </div>
        </form>
        <div class="tpl-alert"></div>
    </div>
</div>
{/block}

